/**
 * 
 */
package ec.com.avila.hiperion.dao.impl;

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import ec.com.avila.hiperion.dao.PolizaDao;
import ec.com.avila.hiperion.entities.Poliza;

/**
 * <b>Permite implementar las operaciones de la tabla Poliza </b>
 * 
 * @author Paul Jimenez
 * @version 1.0,Dec 18, 2013
 * @since JDK1.6
 */
@Stateless
public class PolizaDaoImpl implements PolizaDao {

	@PersistenceContext(unitName = "sgs_pu")
	protected EntityManager em;

	public void guardarPoliza(Poliza poliza) {
		em.persist(poliza);
	}

	@SuppressWarnings("unchecked")
	public List<Poliza> consultarPoliza() {
		return em.createNamedQuery("Poliza.findAll").getResultList();
	}

}
